<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link rel="stylesheet" href="skin/life_list.css">
<script src="js/config.js"></script>
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
</head>
<body>
<div id="main"></div>
</body>
<script>
	zy_init();
	var id=0;
	function getMain(t){
		if(t==-1){
			id=0;
			$$('main').innerHTML='';
			$$('main').className='loading';
		}
		var url = app_path+'index.php?m=iappYp&c=app&a=search&t=iappYp_company&keyword='+encodeURIComponent(localStorage['keyword']);
		uexXmlHttpMgr.open(t,'post',url,"8000");
		uexXmlHttpMgr.send(t);
	}
	window.uexOnload=function(type){
		if(!type){
			uexWindow.evaluateScript('',0,'showButton()');
			uexWindow.setBounce("1");
			uexWindow.onBounceStateChange=function(t,s){
				if(t=="1"){//下方弹动时
	　　　　　　　　	if(s=="2"){//松开手指时
						getMain(t);
					}
				}
	　　　　	}
			uexXmlHttpMgr.onData = function(opId, status, data){
				if(status==1){
					uexXmlHttpMgr.close(opId);
					uexWindow.resetBounceView(opId);
					data=JSON.parse(data);
					
					var List = data['list'];
					var contentHtml = '';			
					if(List.length>0){
						contentHtml += '<section>';
						for (i = 0; i < List.length; i++) {
							contentHtml += '<menu class="box-hor box" ontouchstart="zy_touch(\'down\')" onclick="jump(' + List[i]['id'] + ',' + List[i]['xid'] + ',\'' + List[i]['name'] + '\')">';
							contentHtml += '<img class="logo" src="skin/images/Transparent.gif"';
							if (List[i]['img'] != '') {
								contentHtml += ' style="background-image:url(' + List[i]['img'] + ');"';
							}
							contentHtml += ' />';
							contentHtml += '<div><strong>' + List[i]['name'] + '</strong><img class="Star' + List[i]['star'] + '" src="skin/images/Transparent.gif" /><span>' + List[i]['area_cn'] + ' ' + List[i]['xid_cn'] + '</span>';
							if (List[i]['distance']) {
								contentHtml += '<em>' + List[i]['distance'] + '</em>';
							}
							contentHtml += '</div></menu>';
						}
						contentHtml += '</section>';
						page = 2;
						$$("main").className = '';
					}else{
						$$("main").className = 'notdata';
					}
					$$("main").innerHTML = contentHtml;
					
			
				}else if(status==-1){					
					uexXmlHttpMgr.close(opId);
					if(opId==-1){$$('main').className='errer';}
				}
			}
			if(localStorage['keyword']!=''){
				getMain(-1);
			}
		}
	}
	function jump(id,catid,name){
		localStorage['company_id']=id;
		localStorage['company_catid']=catid;
		uexWindow.open('company_show','0','company_show.html','2','', '',0);
	}
	</script>
</html>